accessibility
Macromedia Logo Upper Navigation Bar
 Help
Lower Navigation Bar
ProductsSupportDesigner DeveloperDownloadsStoreInternationalSite MapCompany
Home > Products > Director > Support > TechNote Index
Macromedia Director Support Center - TechNote

Viewing PDF documents directly on the stage using Adobe's ActiveX control

Product: Director
Platform: Win
Versions: 6.5 to 8.5.1
ID: 14043
How useful was this document?
less more

1

2

3

4

5

How can the document be improved? (300 characters or less - you will not receive a reply.)

Director 6.5 & above for Windows can display PDF documents directly on the stage using Adobe's "Acrobat Control for ActiveX" ActiveX control and Director's Control Xtra for ActiveX feature. The Adobe Active X control is included in the Acrobat Reader download.

Macromedia does not provide Technical Support for implementation of ActiveX controls. Please contact Adobe for any questions regarding the use of their ActiveX control. For more information, see the notes section below.

The primary reason for using Adobe's ActiveX control is that it eliminates having to launch the Acrobat Reader application to view PDF documents. For information on how to use Lingo to launch external applications, refer to "Launching or Opening an Application with Lingo", TechNote #12265.

To use an ActiveX control on a Windows system, Microsoft's ActiveX system software must be properly installed. ActiveX support is standard on Windows 98, and is typically available on Windows systems that have Microsoft's Internet Explorer web browser installed. ActiveX is a 32-bit technology, and it is not available for Windows 3.1. For more information refer to Microsoft and Requirements for Director 6.5 movies using ActiveX Controls (TechNote 13375).

Additional ActiveX control authoring issues are discussed at the end of this TechNote.

To insert Adobe's "Acrobat Control for ActiveX" ActiveX control as a cast member, and create a sprite, do the following:

1 Select Insert >Control >ActiveX.
2

Select "Acrobat Control for ActiveX" & click OK.

 

3

The first property is called "src". If the PDF document will always be located on the system in the exact same absolute path, then the SRC property can be specified in the ActiveX Control Properties window under the "Properties" tab. The SRC parameter will need to be the full (absolute) path to the file, including drive letter.

Note: Relative paths will not be valid as a SRC property. If the PDF will be in the same folder as the Director file, then do not use an absolute path to set the SRC property. Instead, to view PDF documents that are in relative locations, leave the SRC property blank in the ActiveX Control window and use Lingo to set the SRC. Skip to the PDF documents in relative locations section of this TechNote for a Lingo example of setting the SRC to a relative location.

 
4 Click OK for the Properties window and the ActiveX Control Properties window to complete inserting the ActiveX control into the cast.
5 Drag the ActiveX control member from the cast to create a sprite on the stage.
6 If necessary, stretch out the ActiveX sprite so it's big enough to display the entire PDF page.
7 Rewind and play the Director movie .

If the Director movie is in play mode, the PDF document should now be viewable in the ActiveX sprite on the stage. If not, confirm the steps above. Confirm the installation of the ActiveX system extension on the machine. If necessary, test against other PDF files to determine if the problem is caused by a data-related issue.


PDF documents in relative locations

If the PDF file is located in the same folder as the Director movie, use Lingo to set the ActiveX Control's "src" parameter so that the file can be found in that location, regardless of what drive the Director movie is running from.

In a frame script's "on enterFrame" handler, the SRC of the PDF can be set using the Lingo statement "sprite(1).src". The script below could also be modified to load the PDF into the ActiveX sprite when a button is pressed. For example, the following behavior script could be assigned to the Behavior Channel on the first frame where the ActiveX sprite begins:

----------------------------------------
on enterFrame

-- Send a message to Adobe's
-- Acrobat Control for ActiveX
-- to set the "src" parameter

-- NOTE: Make sure that the
-- sprite number refers to the
-- ActiveX Control sprite.
sprite(1).src = the moviePath & "MyPDF.pdf"
end
----------------------------------------

Note: The above script uses Director's new dot syntax (as of version 7). For Director 6.5, use "set the src of sprite 1 = the moviePath & "MyPDF.pdf".


Additional information

For more information on how to use Adobe's "Acrobat Control for ActiveX" ActiveX control, refer to the documentation available on Adobe's web site.

Refer to Director's documentation to learn more about using the Control Xtra for ActiveX. Additionally, an ActiveX Help file named "ActiveX.hlp" is included with the installation of Director. It is located in the ActiveX folder inside Director's Xtras folder.

ActiveX is a Windows-only technology. ActiveX is not available for Macintosh. To view PDF files directly on the stage in cross-platform projects use a third party Xtra such as the "PDF Xtra" available from Integration New Media.

The "Methods" tab in Director's Control Xtra for ActiveX dialog displays an ActiveX control's available methods (if any). In the case of Adobe's Acrobat Control for ActiveX, it offers numerous methods that affect the appearance of their control. This includes setting the document's zoom, the layout, etc.

The ActiveX control's methods are accessed via Lingo. For example, use the Lingo "sprite(1).setCurrentPage(45)" to go to page 45 of the PDF file, or "sprite(1).printPages(1,10)" to print the first 10 pages of the document.

 

Notes:

  • You are limited to the methods and properties provided by the 3rd party ActiveX control. Some of these methods and properties might not be available/accessible via either Director's GUI or Lingo in all versions of the control, or may not function in Director at all.
  • ActiveX controls designed for use in Microsoft's Internet Explorer web browser have a better chance of working as expected in Director, because Director uses an IE-style ActiveX control hosting model. As a result, ActiveX controls designed for the Visual Basic hosting model are less likely to work as expected in Director.
  • Most ActiveX controls were not specifically designed or tested by their developers for use in Director. As with all 3rd party products, including ActiveX controls, their suitability for use with Director is subject to your testing. For implementation, documentation, technical support, installation, licensing and distribution issues, refer to the 3rd party vendor of the ActiveX control.

 



Last updated: April 19, 2002
Keywords: PDF, Adobe, ActiveX, Acrobat, Reader
Created: August 31, 1999
©1995-2002 Macromedia, Inc. All rights reserved.
Use of this website signifies your agreement to the Terms of Use.
Privacy | Site Map
| Contact us | Accessibility